ECHO OFF
ECHO "Importing Database Schema..."
"%programfiles%\Microsoft Visual Studio 10.0\vstsdb\deploy\vsdbcmd" /a:Import /cs:"Server=.\SQLEXPRESS;Integrated Security=true;Pooling=false;Initial Catalog=BonIt;" /dsp:Sql  /model:"Bon-It.Database.dbschema"
PAUSE
ECHO "Deploying Database Schema..."
"%programfiles%\Microsoft Visual Studio 10.0\vstsdb\deploy\vsdbcmd" /a:Deploy /cs:"Server=.\SQLEXPRESS;Integrated Security=true;Pooling=false;Initial Catalog=BonIt" /dsp:Sql /dd+ /model:"Bon-It.Database.dbschema"  /p:TargetDatabase="BonIt"
PAUSE
ECHO "Generating Database Deployment Script..."
"%programfiles%\Microsoft Visual Studio 10.0\vstsdb\deploy\vsdbcmd" /a:Deploy /cs:"Server=.\SQLEXPRESS;Integrated Security=true;Pooling=false;Initial Catalog=BonIt" /dsp:Sql /script:Bon-IT.sql /model:"Bon-It.Database.dbschema" /p:TargetDatabase="BonIt"

PAUSE
EHCHO "Installing the Database"
"%programfiles%\Microsoft SQL Server\100\Tools\Binn\sqlcmd" -S ".\SQLEXPRESS" -i "Bon-IT.sql"
